//
//  starDemoViewController.m
//  starDemo
//
//  Created by user on 11-10-14.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#import "starDemoViewController.h"
#import "Star.h"

@implementation starDemoViewController


- (void)didReceiveMemoryWarning
{
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}

#pragma mark - View lifecycle


// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad
{
    [super viewDidLoad];
    
    Star *star1 = [[Star alloc] initWithFrame:CGRectMake(100.0f, 110.0f, 150.0f, 40.0f)];
    star1.show_star = 89;
    star1.font_size = 15;
    [self.view addSubview:star1];

    
    Star *star2 = [[Star alloc] initWithFrame:CGRectMake(100.0f, 140.0f, 150.0f, 40.0f)];
    star2.show_star = 56;
    star2.font_size = 20;
    star2.empty_color = [UIColor blueColor];
    star2.full_color = [UIColor redColor];
    [self.view addSubview:star2];

    
    Star *star3 = [[Star alloc] initWithFrame:CGRectMake(60.0f, 240.0f, 200.0f, 40.0f)];
    star3.show_star = 40;
    star3.isSelect = YES;
    star3.font_size = 40;
    [self.view addSubview:star3];

}


- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

@end
